package com.itheima.mapper;

import com.itheima.pojo.entity.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;

/**
 * @className OrderSettingMapper
 */
@Mapper
public interface OrderSettingMapper {
    @Select("select * from t_ordersetting where orderDate = #{orderDate}")
    OrderSetting selectOrderSettingByDate(LocalDate orderDate); //  查询指定日期的预约设置

    @Update("update t_ordersetting set number = #{number}, reservations = #{reservations} where orderDate = #{orderDate}")
    void updateOrderSettingByOrderDate(OrderSetting orderSetting); //  更新预约设置
}
